package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 日志实体类
 */
@TableName("t_journal")
public class JournalBean {
    // 日志id
    @TableId(value = "pk_journalId",type = IdType.AUTO)
    private Integer id;
    // 日志内容
    @TableField("j_content")
    private String content;
    // 日志时间
    @TableField("j_date")
    private LocalDate date = LocalDate.now();

    public JournalBean() {
    }

    public JournalBean(String content) {
        this.content = content;

    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "JournalBean{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", date=" + date +
                "}\n";
    }
}
